Skip to content

[cherry-pick: release-v1.3.x] fix: panic in v1beta1 matrix validation for invalid result refs#9260

Open
tekton-robot wants to merge 1 commit intorelease-v1.3.xfrom
cherry-pick-9135-to-release-v1.3.x
Open

[cherry-pick: release-v1.3.x] fix: panic in v1beta1 matrix validation for invalid result refs#9260
tekton-robot wants to merge 1 commit intorelease-v1.3.xfrom
cherry-pick-9135-to-release-v1.3.x

Conversation

@tekton-robot
Copy link
Collaborator

This is a cherry-pick of #9135


This fix applies the same safety check that was added to v1 pipelines in PR #8089. The validateMatrixedPipelineTaskConsumed function was panicking when encountering invalid variable substitutions like "$(tasks)-$(tasks.echo-result.results.output)" because it tried to access subExpressions[1] without first checking if the expression was a valid result reference.

The fix adds a check to skip expressions that don't look like result references before attempting to parse them, preventing the panic and allowing the webhook to return a proper validation error instead.

Related: #8089

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Resolved an issue where Pipelines with invalid result references in matrix parameters would cause a panic during validation (v1beta1 API)

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Dec 19, 2025
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 19, 2025
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 19, 2025
@tekton-robot
Copy link
Collaborator Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 19, 2025
@vdemeester
Copy link
Member

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 19, 2025
@vdemeester
Copy link
Member

/retest

5 similar comments
@vdemeester
Copy link
Member

/retest

@vdemeester
Copy link
Member

/retest

@vdemeester
Copy link
Member

/retest

@vdemeester
Copy link
Member

/retest

@waveywaves
Copy link
Member

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants